<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>跳转中</title>
    <style>
        body {
            height: 100%;
            width: 100%;
        }
        
        .verification {
            height: 100px;
            width: 100px;
            position: absolute;
            top: 50%;
            left: 50%;
            margin-top: -50px;
            margin-left: -50px;
            text-align: center;
        }
    </style>
    <script>
        window.onload=function(){
            var token = getQueryString("token");
            var redirectUrl=getQueryString("redirectUrl");
            var iframeOrigin=getQueryString("iframeOrigin");
            if(token){
                localStorage.setItem('LG_TK', token)
                if(redirectUrl){
                    window.location.href = "./#/"+redirectUrl;
                }else{
                    window.location.href = "./#/dashboard";
                }
                if(iframeOrigin){
                    localStorage.setItem('IFRAME_ORIGIN', iframeOrigin)
                }
            }
        }

        function getQueryString(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]);
            return null;
        }
    </script>
</head>

<body>
    <div class="verification">
        <img src="./images/icon@2x.png">
        <div class="verification-tips">验证中...</div>
    </div>
</body>

</html>